package top.mczhengyi.xyblog.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RequestMapping("/t")
@RestController
@Slf4j
public class IpController {
    @GetMapping("/ip")
    public String getIp(HttpServletRequest request) {
        String header2 = request.getHeader("X-Forwarded-For");
        log.info(header2);
        return  "SUCCESS";
    }
}
